<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('变更服务商业务类型')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-saveAccountUpdate-saveAccountAdjust">
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">服务商编号：</label>
                <div class="col-sm-8">
                    <input type="text" name="agentNum" th:value="${account.AGENT_NUM}" class="form-control" readonly/>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">账户类型：</label>
                <div class="col-sm-8">
                    <select name="accountType" class="form-control">
                        <option value="1">分润</option>
                        <option value="2">返现</option>
                        <option value="3">通讯费</option>
                        <option value="4">服务费</option>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">调整类型：</label>
                <div class="col-sm-8">
                    <select name="adjustType" class="form-control">
                        <option value="0">调减</option>
                        <option value="1">调增</option>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">调整金额：</label>
                <div class="col-sm-8">
                    <input type="text" name="money" class="form-control" required/>
                </div>
            </div>
            <div class="form-group">
            <label class="col-sm-3 control-label is-required">备注：</label>
            <div class="col-sm-8">
                <textarea type="text" name="note" class="form-control" placeholder="请输入说明" required></textarea>
            </div>
    </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <th:block th:include="include :: utils-js" />
    <script th:inline="javascript">
        var prefix = ctx + "walletDetails/walletDetails";
        $("#form-setSignAgent-saveAccountAdjust").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                if (!$.vali.money($("input[name='money']").val())){
                    $.modal.alertError("请输入正确的调整金额");
                    return;
                }
                $.operate.save(prefix + "/saveAccountAdjust", $('#form-saveAccountUpdate-saveAccountAdjust').serialize());
            }
        }

    </script>
</body>
</html>